package com.arvin.router.compiler.util;

import java.util.Collection;
import java.util.Map;

public class Utils {

    public static boolean isEmpty(Collection collection){
        if (collection == null) {
            return true;
        }
        if (collection.isEmpty()){
            return true;
        }
        return false;
    }

    public static boolean isEmpty(Map map){
        if (map == null) {
            return true;
        }
        if (map.isEmpty()){
            return true;
        }
        return false;
    }

    public static boolean isEmpty(String str){
        if (str==null) {
            return true;
        }
        if (str.trim().isEmpty()){
            return true;
        }
        return false;
    }
}
